module error_compute
	#(parameter length = 16)
	(
		input signed [length-1:0] expect_result,
		input signed [2*length+4:0] parallel_compressor_out,
		output signed [length-1:0] error_distance
	);

//裴哥文章中的映射方法
wire signed [length-1:0] temp;
assign temp = {parallel_compressor_out[36], parallel_compressor_out[28:14]};//这里首位从29到36都可以取，理解原本幅值都是1
assign error_distance = expect_result - temp;

// assign error_distance = expect_result - parallel_compressor_out[2*length+4-:length];
////直接映射会出现错误，不能达到滤波效果 ？？？？

endmodule